/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __456D6213_965D_4EEE_ADDA_FC5F7D483F5F__
#define __456D6213_965D_4EEE_ADDA_FC5F7D483F5F__

namespace xos_container
{
    class i_container;
}

namespace net
{

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    // 
    // i_module
    // 
    class i_module : public xos::i_release
    {
    protected:
        virtual ~i_module() {}

    public:
        virtual int set_heart_check_interval_ms( int n_heart_interval_ms ) = 0;

        virtual int set_caller_callback( xos_box::i_notify * pNotify ) = 0;
        virtual int set_net_callback( xos_box::i_notify * pNotify ) = 0;

        virtual xos_box::i_notify * get_callback() = 0;

        virtual int set_user_data( void * pUserData ) = 0;
        virtual void * get_user_data() = 0;
    };

    // 
    // 模块导出函数定义
    // 
    typedef int ( * f_create )( xos_container::i_container * pContainer, i_module ** ppv );


} // net

#endif // __456D6213_965D_4EEE_ADDA_FC5F7D483F5F__
